﻿@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <meta http-equiv="Cache" content="no-cache" />
    <title>急性胸痛患者时间管理表</title>
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script src="~/Scripts/common.js?v=@DateTime.Now.ToString("yyyyMMdd")"></script>
    <script src="~/Scripts/CreateControl.js?v=@DateTime.Now.ToString("yyyyMMdd")" type="text/javascript"></script>
</head>
<body style="height:1500px;">
    <script type="text/javascript">
        CreatePrintViewerEx("100%", "80%", '@Url.Content("~/Grf/泉一胸痛病历.grf")' + '?id=' + getRnd(), "", true, "<param name=BorderStyle value=1>");
        $(document).ready(function () {
            PrintStart();
        });
        function PrintStart() {
            var pid = "@ViewBag.pid";
            $.ajax({
                url: "/ChestPainCenter/MedicalRecords/GetCaseHistory?Pid=" + pid,
                cache: false,
                success: function (data) {
                    var d = $.parseJSON(data);
                    if (d.Result == 1) {
                        obj = $.parseJSON(d.Body);
                        ReportViewer.Stop();
                        var Report = ReportViewer.Report;
                        //寻找报表里的字段
                        var Recordset = ReportViewer.Report.DetailGrid.Recordset;
                        var PATIENT_ID = ReportViewer.Report.FieldByName("PATIENT_ID");
                        var Hospital_ID = ReportViewer.Report.FieldByName("Hospital_ID");
                        var Patient_Pay_Type = ReportViewer.Report.FieldByName("Patient_Pay_Type");
                        var PATIENT_NAME = ReportViewer.Report.FieldByName("PATIENT_NAME");
                        var PATIENT_SEX = ReportViewer.Report.FieldByName("PATIENT_SEX");
                        var PATIENT_AGE = ReportViewer.Report.FieldByName("PATIENT_AGE");
                        var PATIENT_ADDR_Province = ReportViewer.Report.FieldByName("PATIENT_ADDR_Province");
                        var PATIENT_ADDR_City = ReportViewer.Report.FieldByName("PATIENT_ADDR_City");
                        var PATIENT_ADDR_District = ReportViewer.Report.FieldByName("PATIENT_ADDR_District");
                        var PATIENT_ADDR = ReportViewer.Report.FieldByName("PATIENT_ADDR");
                        var EMS_DISEASE_TIME = ReportViewer.Report.FieldByName("EMS_DISEASE_TIME");
                        var HelpTime = ReportViewer.Report.FieldByName("HelpTime");
                        var Contact_Time = ReportViewer.Report.FieldByName("Contact_Time");
                        var ArriveDoorTime = ReportViewer.Report.FieldByName("ArriveDoorTime");
                        var LeaveTime = ReportViewer.Report.FieldByName("ArriveDoorTime");
                        var AMEcg_Time = ReportViewer.Report.FieldByName("AMEcg_Time");
                        var ECG_CONFIRM_TIME = ReportViewer.Report.FieldByName("ECG_CONFIRM_TIME");
                        var IS_ECG_TRANSMISSION = ReportViewer.Report.FieldByName("IS_ECG_TRANSMISSION");
                        var TRANSMISSION_TIME = ReportViewer.Report.FieldByName("TRANSMISSION_TIME");
                        var TRANSMISSION_CLASS = ReportViewer.Report.FieldByName("TRANSMISSION_CLASS");
                        var AspirinClopidogrel_Bool = ReportViewer.Report.FieldByName("AspirinClopidogrel_Bool");
                        var Delivery_Time = ReportViewer.Report.FieldByName("Delivery_Time");
                        var Aspirin = ReportViewer.Report.FieldByName("Aspirin");
                        var Ticagrelor = ReportViewer.Report.FieldByName("Ticagrelor");
                        var Clopidogrel = ReportViewer.Report.FieldByName("Clopidogrel");
                        var Thrombolysis_Check = ReportViewer.Report.FieldByName("Thrombolysis_Check");
                        var Thrombolysis_Surgery = ReportViewer.Report.FieldByName("Thrombolysis_Surgery");
                        var Thrombolysis_Place = ReportViewer.Report.FieldByName("Thrombolysis_Place");
                        var Thrombolysis_Agree_Time = ReportViewer.Report.FieldByName("Thrombolysis_Agree_Time");
                        var Thrombolysis_UnderstandAgree_Time = ReportViewer.Report.FieldByName("Thrombolysis_UnderstandAgree_Time");//
                        var Thrombolysis_Start_Time = ReportViewer.Report.FieldByName("Thrombolysis_Start_Time");
                        var Thrombolysis_End_Time = ReportViewer.Report.FieldByName("Thrombolysis_End_Time");
                        var Thrombolysis_Imaging_Time = ReportViewer.Report.FieldByName("Thrombolysis_Imaging_Time");
                        var Thrombolysis_Drug_Type = ReportViewer.Report.FieldByName("Thrombolysis_Drug_Type");
                        var Thrombolysis_Drug_Dose = ReportViewer.Report.FieldByName("Thrombolysis_Drug_Dose");
                        var Thrombolysis_Recanalization_Bool = ReportViewer.Report.FieldByName("Thrombolysis_Recanalization_Bool");
                        var PreHospital_Diagnosis = ReportViewer.Report.FieldByName("PreHospital_Diagnosis");
                        var PreHospital_CPC = ReportViewer.Report.FieldByName("PreHospital_CPC");
                        var PreHospital_UserName = ReportViewer.Report.FieldByName("PreHospital_UserName");
                        //
                        var EMS_ARRIVEDOOR_TIME = ReportViewer.Report.FieldByName("EMS_ARRIVEDOOR_TIME");
                        var Contact_Time2 = ReportViewer.Report.FieldByName("Contact_Time2");
                        var PATIENT_ARRIVE_CLASS = ReportViewer.Report.FieldByName("PATIENT_ARRIVE_CLASS");
                        var DiseaseDep = ReportViewer.Report.FieldByName("DiseaseDep");
                        var ConsultationTime = ReportViewer.Report.FieldByName("ConsultationTime");
                        var LeaveDepTime = ReportViewer.Report.FieldByName("LeaveDepTime");
                        var PATIENT_CONSCIOUSNESS = ReportViewer.Report.FieldByName("PATIENT_CONSCIOUSNESS");
                        var PatientBreathe = ReportViewer.Report.FieldByName("PatientBreathe");
                        var PatientPulse = ReportViewer.Report.FieldByName("PatientPulse");
                        var PATIENT_HEART = ReportViewer.Report.FieldByName("PATIENT_HEART");
                        var PATIENT_BLOOD_L = ReportViewer.Report.FieldByName("PATIENT_BLOOD_L");
                        var PATIENT_BLOOD_H = ReportViewer.Report.FieldByName("PATIENT_BLOOD_H");
                        var PATIENT_SPO2 = ReportViewer.Report.FieldByName("PATIENT_SPO2");
                        var Triage_To = ReportViewer.Report.FieldByName("Triage_To");
                        var Triage_Name = ReportViewer.Report.FieldByName("Triage_Name");
                        var Ecg_Time = ReportViewer.Report.FieldByName("Ecg_Time");
                        var ECG_CONFIRM_TIME2 = ReportViewer.Report.FieldByName("ECG_CONFIRM_TIME2");
                        var ConditionAssessment = ReportViewer.Report.FieldByName("ConditionAssessment");
                        var DrawBloodTime = ReportViewer.Report.FieldByName("DrawBloodTime");
                        var ReportTime = ReportViewer.Report.FieldByName("ReportTime");
                        var Troponin_Num = ReportViewer.Report.FieldByName("Troponin_Num");
                        var CrValue = ReportViewer.Report.FieldByName("CrValue");
                        var Check_D_dimer_Unit = ReportViewer.Report.FieldByName("Check_D_dimer_Unit");
                        var Check_BNPNT = ReportViewer.Report.FieldByName("Check_BNPNT");
                        var Doubt_Radiology_NoticeTime = ReportViewer.Report.FieldByName("Doubt_Radiology_NoticeTime");
                        var Radiology_HeartSuper_Time = ReportViewer.Report.FieldByName("Radiology_HeartSuper_Time");
                        var CT__NoticeTime = ReportViewer.Report.FieldByName("CT__NoticeTime");
                        var EnhancedCT_STime = ReportViewer.Report.FieldByName("EnhancedCT_STime");
                        var Doubt_Radiography_DIAGNOSIS = ReportViewer.Report.FieldByName("Doubt_Radiography_DIAGNOSIS");
                        var Doubt_Radiography_DIAGNOSISTime = ReportViewer.Report.FieldByName("Doubt_Radiography_DIAGNOSISTime");
                        var IS_NOTICE_IMCD = ReportViewer.Report.FieldByName("IS_NOTICE_IMCD");
                        var RoomMeetTime = ReportViewer.Report.FieldByName("RoomMeetTime");
                        var ChestClinic_Name = ReportViewer.Report.FieldByName("ChestClinic_Name");
                        var Cardiology_Consultation_Time = ReportViewer.Report.FieldByName("Cardiology_Consultation_Time");
                        //二线会诊医师签名没有 目前不需要赋值强制为空即可
                        var Cardiology_DIAGNOSIS = ReportViewer.Report.FieldByName("Cardiology_DIAGNOSIS");
                        var Cardiology_Surgery_Time = ReportViewer.Report.FieldByName("Cardiology_Surgery_Time");//决定介入手术室时间
                        var Cardiology_Catheter_Time = ReportViewer.Report.FieldByName("Cardiology_Catheter_Time");//启动导管室时间
                        var Cardiology_SUnderstandAgree_Time = ReportViewer.Report.FieldByName("Cardiology_SUnderstandAgree_Time");
                        var Cardiology_EUnderstandAgree_Time = ReportViewer.Report.FieldByName("Cardiology_EUnderstandAgree_Time");
                        //第一页 右侧开始 右下角区域
                        var Killip_LV = ReportViewer.Report.FieldByName("Killip_LV");
                        var NYHA_LV = ReportViewer.Report.FieldByName("NYHA_LV");
                        var NYHA_Type = ReportViewer.Report.FieldByName("NYHA_Type");
                        var STEMI_Methods = ReportViewer.Report.FieldByName("STEMI_Methods");
                        var NSTE_ACS = ReportViewer.Report.FieldByName("NSTE_ACS");
                        var Catheter_CulpritVessel_Type = ReportViewer.Report.FieldByName("Catheter_CulpritVessel_Type");

                        //第二页开始
                        var Cardiology_Thrombolysis_Check = ReportViewer.Report.FieldByName("Cardiology_Thrombolysis_Check");
                        var Cardiology_Thrombolysis_Court = ReportViewer.Report.FieldByName("Cardiology_Thrombolysis_Court");
                        var Cardiology_Thrombolysis_STime = ReportViewer.Report.FieldByName("Cardiology_Thrombolysis_STime");
                        var Cardiology_Thrombolysis_ETime = ReportViewer.Report.FieldByName("Cardiology_Thrombolysis_ETime");
                        var Cardiology_Thrombolysis_ImagingTime = ReportViewer.Report.FieldByName("Cardiology_Thrombolysis_ImagingTime");
                        var Cardiology_Thrombolysis_Drug = ReportViewer.Report.FieldByName("Cardiology_Thrombolysis_Drug");
                        var Cardiology_Thrombolysis_DrugDose = ReportViewer.Report.FieldByName("Cardiology_Thrombolysis_DrugDose");
                        var Cardiology_Thrombolysis_Again = ReportViewer.Report.FieldByName("Cardiology_Thrombolysis_Again");
                        var Visit_ECG_Time = ReportViewer.Report.FieldByName("Visit_ECG_Time");
                        var Visit_Troponin_Result = ReportViewer.Report.FieldByName("Visit_Troponin_Result");
                        var Visit_Troponin_STime = ReportViewer.Report.FieldByName("Visit_Troponin_STime");
                        var Visit_Troponin_RTime = ReportViewer.Report.FieldByName("Visit_Troponin_RTime");
                        var Grace_Risk_LV = ReportViewer.Report.FieldByName("Grace_Risk_LV");
                        var Grace_Risk_Type = ReportViewer.Report.FieldByName("Grace_Risk_Type");
                        var Visit_Diagnosis = ReportViewer.Report.FieldByName("Visit_Diagnosis");
                        //急诊留观 右侧区域
                        var PCI_Time = ReportViewer.Report.FieldByName("PCI_Time");
                        var Antiplatelet_Time = ReportViewer.Report.FieldByName("Antiplatelet_Time");
                        var Antiplatelet_Aspirin = ReportViewer.Report.FieldByName("Antiplatelet_Aspirin");
                        var Antiplatelet_Ticagrelor = ReportViewer.Report.FieldByName("Antiplatelet_Ticagrelor");
                        var Antiplatelet_Clopidogrel = ReportViewer.Report.FieldByName("Antiplatelet_Clopidogrel");
                        var Treatment_24H_Bool = ReportViewer.Report.FieldByName("Treatment_24H_Bool");
                        var Treatment_Blockers_Bool = ReportViewer.Report.FieldByName("Treatment_Blockers_Bool");
                        var EMS_Name = ReportViewer.Report.FieldByName("EMS_Name");
                        //导管室
                        var Catheter_Start_Type = ReportViewer.Report.FieldByName("Catheter_Start_Type");
                        var Catheter_Activation_Time = ReportViewer.Report.FieldByName("Catheter_Activation_Time");
                        var Catheter_Vascular_Pathway = ReportViewer.Report.FieldByName("Catheter_Vascular_Pathway");
                        var Catheter_Piercing_Time = ReportViewer.Report.FieldByName("Catheter_Piercing_Time");
                        var Catheter_Imaging_Time = ReportViewer.Report.FieldByName("Catheter_Imaging_Time");
                        var Catheter_Adopt_Time = ReportViewer.Report.FieldByName("Catheter_Adopt_Time");
                        var Catheter_SurgeryEnd_Time = ReportViewer.Report.FieldByName("Catheter_SurgeryEnd_Time");
                        var Catheter_NoCulpritVessel_Type = ReportViewer.Report.FieldByName("Catheter_NoCulpritVessel_Type");
                        var Catheter_CulpritVessel_STIMI = ReportViewer.Report.FieldByName("Catheter_CulpritVessel_STIMI");
                        var Catheter_CulpritVessel_ETIMI = ReportViewer.Report.FieldByName("Catheter_CulpritVessel_ETIMI");
                        var Catheter_CulpritVessel_Location = ReportViewer.Report.FieldByName("Catheter_CulpritVessel_Location");
                        var Catheter_NoCulpritVessel_Location = ReportViewer.Report.FieldByName("Catheter_NoCulpritVessel_Location");
                        var Catheter_BloodClots_Bool = ReportViewer.Report.FieldByName("Catheter_BloodClots_Bool");
                        var Catheter_Lesions_Bool = ReportViewer.Report.FieldByName("Catheter_Lesions_Bool");
                        var Catheter_CTO_Bool = ReportViewer.Report.FieldByName("Catheter_CTO_Bool");
                        var Catheter_Stents_Num = ReportViewer.Report.FieldByName("Catheter_Stents_Num");
                        var Catheter_Anticoagulation_Type = ReportViewer.Report.FieldByName("Catheter_Anticoagulation_Type");
                        var Catheter_Anticoagulation_Num = ReportViewer.Report.FieldByName("Catheter_Anticoagulation_Num");
                        var Catheter_Anticoagulation_Time = ReportViewer.Report.FieldByName("Catheter_Anticoagulation_Time");
                        var Catheter_Imaging_Lumen = ReportViewer.Report.FieldByName("Catheter_Imaging_Lumen");
                        var Catheter_Detection_Type = ReportViewer.Report.FieldByName("Catheter_Detection_Type");
                        var Catheter_IABP_Bool = ReportViewer.Report.FieldByName("Catheter_IABP_Bool");
                        var Catheter_BloodClots_Suction = ReportViewer.Report.FieldByName("Catheter_BloodClots_Suction");
                        var Catheter_Pacemaker = ReportViewer.Report.FieldByName("Catheter_Pacemaker");
                        var Catheter_ECMO = ReportViewer.Report.FieldByName("Catheter_ECMO");
                        var Catheter_LeftAssistDevice = ReportViewer.Report.FieldByName("Catheter_LeftAssistDevice");
                        var Catheter_Complications = ReportViewer.Report.FieldByName("Catheter_Complications");
                        var Catheter_B2B = ReportViewer.Report.FieldByName("Catheter_B2B");
                        var Catheter_Delay_Bool = ReportViewer.Report.FieldByName("Catheter_Delay_Bool");
                        var Catheter_Name = ReportViewer.Report.FieldByName("Catheter_Name");
                        //转归
                        var OutComeType = ReportViewer.Report.FieldByName("OutComeType");
                        var OutCome_DIAGNOSIS = ReportViewer.Report.FieldByName("OutCome_DIAGNOSIS");
                        var OutCome_Time = ReportViewer.Report.FieldByName("OutCome_Time");
                        var OutCome_72H_MAX = ReportViewer.Report.FieldByName("OutCome_72H_MAX");
                        var OutCome_BNP_Type = ReportViewer.Report.FieldByName("OutCome_BNP_Type");
                        var OutCome_BNP_Values = ReportViewer.Report.FieldByName("OutCome_BNP_Values");
                        var OutCome_Imaging = ReportViewer.Report.FieldByName("OutCome_Imaging");
                        var OutCome_Complications = ReportViewer.Report.FieldByName("OutCome_Complications");
                        var OutCome_Risk = ReportViewer.Report.FieldByName("OutCome_Risk");
                        var OutCome_HeartFailure = ReportViewer.Report.FieldByName("OutCome_HeartFailure");
                        var LeaveHospitalTime = ReportViewer.Report.FieldByName("LeaveHospitalTime");
                        var InHospital_Day = ReportViewer.Report.FieldByName("InHospital_Day");
                        var OutCome_Cost = ReportViewer.Report.FieldByName("OutCome_Cost");
                        var Treatment_Results = ReportViewer.Report.FieldByName("Treatment_Results");
                        var TakeMedicineType = ReportViewer.Report.FieldByName("TakeMedicineType");
                        var Treatment_Name = ReportViewer.Report.FieldByName("Treatment_Name");

                        Report.PrepareLoadData();
                        Recordset.Append();
                        //为字段赋值
                        if (obj.PatientId == null) obj.PatientId = "";
                        PATIENT_ID.AsString = obj.PatientId;
                        if (obj.Hospital_ID == null) obj.Hospital_ID = "";
                        Hospital_ID.AsString = obj.Hospital_ID;//住院ID
                        Patient_Pay_Type.AsString = GetPayType(obj.Patient_Pay_Type);
                        if (obj.PatientName == null) obj.PatientName = "";
                        PATIENT_NAME.AsString = obj.PatientName;
                        if (obj.PatientSex == null) obj.PatientSex = "";
                        PATIENT_SEX.AsString = GetGender(obj.PatientSex);
                        if (obj.PatientAge == null) obj.PatientAge = "";
                        PATIENT_AGE.AsString = (obj.PatientAge);
                        if (obj.PATIENT_ADDR_Province == null) obj.PATIENT_ADDR_Province = "";
                        PATIENT_ADDR_Province.AsString = (obj.PATIENT_ADDR_Province);
                        if (obj.PATIENT_ADDR_City == null) obj.PATIENT_ADDR_City = "";
                        PATIENT_ADDR_City.AsString = (obj.PATIENT_ADDR_City);
                        if (obj.PATIENT_ADDR_District == null) obj.PATIENT_ADDR_District = "";
                        PATIENT_ADDR_District.AsString = (obj.PATIENT_ADDR_District);
                        if (obj.EMS_DISEASE_ADDR == null) obj.EMS_DISEASE_ADDR = "";
                        PATIENT_ADDR.AsString = (obj.EMS_DISEASE_ADDR);
                        if (obj.EmsDiseaseTime == null) obj.EmsDiseaseTime = "";
                        EMS_DISEASE_TIME.AsString = obj.EmsDiseaseTime;
                        if (obj.HelpTime == null) obj.HelpTime = "";
                        HelpTime.AsString = obj.HelpTime;
                        if (obj.AMBULANCE_Contact_Time == null) obj.AMBULANCE_Contact_Time = "";
                        Contact_Time.AsString = obj.AMBULANCE_Contact_Time;
                        if (obj.ArriveDoorTime == null) obj.ArriveDoorTime = "";
                        ArriveDoorTime.AsString = obj.ArriveDoorTime;
                        if (obj.LeaveTime == null) obj.LeaveTime = "";
                        LeaveTime.AsString = obj.LeaveTime;
                        if (obj.AMEcg_Time == null) AMEcg_Time = "";
                        AMEcg_Time.AsString = obj.AMEcg_Time;
                        if (obj.ECG_CONFIRM_TIME == null) obj.ECG_CONFIRM_TIME = "";
                        ECG_CONFIRM_TIME.AsString = obj.ECG_CONFIRM_TIME;
                        if (obj.IsEcgTransmission == null) obj.IS_ECG_TRANSMISSION = "";
                        IS_ECG_TRANSMISSION.AsString = GetIsEcgTransmission(obj.IsEcgTransmission);
                        if (obj.TransmissionTime == null) obj.TransmissionTime = "";
                        TRANSMISSION_TIME.AsString = obj.TransmissionTime;
                        TRANSMISSION_CLASS.AsString = GetTransmissionClass(obj.TransmissionClass);
                        AspirinClopidogrel_Bool.AsString = GetAspirinClopidogrel_Bool(obj.AspirinClopidogrel_Bool);
                        if (obj.Delivery_Time == null) obj.Delivery_Time = "";
                        Delivery_Time.AsString = obj.Delivery_Time;
                        if (obj.Aspirin == null) obj.Aspirin = "";
                        Aspirin.AsString = obj.Aspirin;
                        if (obj.Ticagrelor == null) obj.Ticagrelor = "";
                        Ticagrelor.AsString = obj.Ticagrelor;
                        if (obj.Clopidogrel == null) obj.Clopidogrel = "";
                        Clopidogrel.AsString = obj.Clopidogrel;
                        Thrombolysis_Check.AsString = GetThrombolysis_Check(obj.Thrombolysis_Check);
                        Thrombolysis_Surgery.AsString = GetThrombolysis_Surgery(obj.Thrombolysis_Surgery);
                        Thrombolysis_Place.AsString = GetThrombolysis_Place(obj.Thrombolysis_Place);

                        if (obj.Thrombolysis_Agree_Time == null) obj.obj.Thrombolysis_Agree_Time = "";
                        Thrombolysis_Agree_Time.AsString = obj.Thrombolysis_Agree_Time;
                        if (obj.Thrombolysis_UnderstandAgree_Time == null) obj.Thrombolysis_UnderstandAgree_Time = "";
                        Thrombolysis_UnderstandAgree_Time.AsString = obj.Thrombolysis_UnderstandAgree_Time;

                        if (obj.Thrombolysis_Start_Time == null) obj.Thrombolysis_Start_Time = "";
                        Thrombolysis_Start_Time.AsString = obj.Thrombolysis_Start_Time;
                        if (obj.Thrombolysis_End_Time == null) obj.Thrombolysis_End_Time = "";
                        Thrombolysis_End_Time.AsString = obj.Thrombolysis_End_Time;
                        if (obj.Thrombolysis_Imaging_Time == null) Thrombolysis_Imaging_Time = "";
                        Thrombolysis_Imaging_Time.AsString = obj.Thrombolysis_Imaging_Time;
                        Thrombolysis_Drug_Type.AsString = GetThrombolysis_Drug_Type(obj.Thrombolysis_Drug_Type);
                        Thrombolysis_Drug_Dose.AsString = GetThrombolysis_Drug_Dose(obj.Thrombolysis_Drug_Dose);
                        Thrombolysis_Recanalization_Bool.AsString = GetThrombolysis_Recanalization_Bool(obj.Thrombolysis_Recanalization_Bool);
                        PreHospital_Diagnosis.AsString = GetPreHospital_Diagnosis(obj.PreHospital_Diagnosis);
                        PreHospital_CPC.AsString = GetPreHospital_CPC(obj.PreHospital_CPC);
                        if (obj.PreHospital_UserName == null) obj.PreHospital_UserName = "";
                        PreHospital_UserName.AsString = obj.PreHospital_UserName;
                        //第二部分
                        if (obj.EmsArriveDoorTime == null) obj.EmsArriveDoorTime = "";
                        EMS_ARRIVEDOOR_TIME.AsString = obj.EmsArriveDoorTime;
                        if (obj.Contact_Time == null) obj.Contact_Time = "";
                        Contact_Time2.AsString = obj.Contact_Time;
                        PATIENT_ARRIVE_CLASS.AsString = GetPATIENT_ARRIVE_CLASS(obj.PatientArriveClass);
                        if (obj.DiseaseDep == null) obj.DiseaseDep = "";
                        DiseaseDep.AsString = obj.DiseaseDep;
                        if (obj.ConsultationTime == null) obj.ConsultationTime = "";
                        ConsultationTime.AsString = obj.ConsultationTime;
                        if (obj.LeaveDepTime == null) obj.LeaveDepTime = "";
                        LeaveDepTime.AsString = obj.LeaveDepTime;
                        PATIENT_CONSCIOUSNESS.AsString = GetClass(1, obj.PatientConsciousness, 4);
                        if (obj.PatientBreathe == null) obj.PatientBreathe = "";
                        PatientBreathe.AsString = obj.PatientBreathe;
                        if (obj.PatientPulse == null) obj.PatientPulse = "";
                        PatientPulse.AsString = obj.PatientPulse;
                        if (obj.PatientHeart == null) obj.PatientHeart = "";
                        PATIENT_HEART.AsString = obj.PatientHeart;
                        if (obj.PatientBloodL == null) obj.PatientBloodL = "";
                        PATIENT_BLOOD_L.AsString = obj.PatientBloodL;
                        if (obj.PatientBloodH == null) obj.PatientBloodH = "";
                        PATIENT_BLOOD_H.AsString = obj.PatientBloodH;
                        if (obj.PATIENT_SPO2 == null) obj.PATIENT_SPO2 = "";
                        PATIENT_SPO2.AsString = obj.PATIENT_SPO2;
                        if (obj.Triage_To == null) obj.Triage_To = "";
                        Triage_To.AsString = GetTriage_To(obj.Triage_To);
                        if (obj.Triage_Name == null) obj.Triage_Name = "";
                        Triage_Name.AsString = obj.Triage_Name;
                        //第三部分
                        if (obj.Ecg_Time == null) obj.Ecg_Time = "";
                        Ecg_Time.AsString = obj.Ecg_Time;
                        if (obj.EcgConfirmTime == null) obj.EcgConfirmTime = "";
                        ECG_CONFIRM_TIME2.AsString = obj.EcgConfirmTime;
                        ConditionAssessment.AsString = GetClass(2, obj.ConditionAssessment, 12, 1);
                        
                        if (obj.DrawBloodTime == null) obj.DrawBloodTime = "";
                        DrawBloodTime.AsString = obj.DrawBloodTime;
                        if (obj.ReportTime == null) obj.ReportTime = "";
                        ReportTime.AsString = obj.ReportTime;
                        if (obj.Troponin_Num == null) obj.Troponin_Num = "";
                        Troponin_Num.AsString = obj.Troponin_Num;
                        if (obj.CrValue == null) obj.CrValue = "";
                        CrValue.AsString = obj.CrValue;
                        if (obj.Check_D_dimer_Unit == null) obj.Check_D_dimer_Unit = "";
                        Check_D_dimer_Unit.AsString = obj.Check_D_dimer_Unit;
                        if (obj.Check_BNPNT == null) obj.Check_BNPNT = "";
                        Check_BNPNT.AsString = obj.Check_BNPNT;
                        if (obj.Doubt_Radiology_NoticeTime == null) obj.Doubt_Radiology_NoticeTime = "";
                        Doubt_Radiology_NoticeTime.AsString = obj.Doubt_Radiology_NoticeTime;
                        if (obj.Radiology_HeartSuper_Time == null) obj.Radiology_HeartSuper_Time = "";
                        Radiology_HeartSuper_Time.AsString = obj.Radiology_HeartSuper_Time;
                        if (obj.CT_NoticeTime == null) obj.CT_NoticeTime = "";
                        CT__NoticeTime.AsString = obj.CT_NoticeTime;
                        if (obj.EnhancedCT_STime == null) obj.EnhancedCT_STime = "";
                        EnhancedCT_STime.AsString = obj.EnhancedCT_STime;

                        Doubt_Radiography_DIAGNOSIS.AsString = GetClass(3, obj.Doubt_Radiography_DIAGNOSIS, 8,1);
                        if (obj.Doubt_Radiography_DIAGNOSISTime == null) obj.Doubt_Radiography_DIAGNOSISTime = "";
                        Doubt_Radiography_DIAGNOSISTime.AsString = obj.Doubt_Radiography_DIAGNOSISTime;
                        IS_NOTICE_IMCD.AsString = GetClass(4, obj.IS_NOTICE_IMCD, 2);
                        if (obj.RoomMeetTime == null) obj.RoomMeetTime = "";
                        RoomMeetTime.AsString = obj.RoomMeetTime;
                        if (obj.ChestClinic_Name == null) ChestClinic_Name = "";
                        ChestClinic_Name.AsString = obj.ChestClinic_Name;
                        if (obj.Cardiology_Consultation_Time == null) obj.Cardiology_Consultation_Time = "";
                        Cardiology_Consultation_Time.AsString = obj.Cardiology_Consultation_Time;
                        //二线会诊医师签名没有
                        Cardiology_DIAGNOSIS.AsString = GetClass(5, obj.Cardiology_DIAGNOSIS, 8);
                        if (obj.Cardiology_Surgery_Time == null) obj.Cardiology_Surgery_Time = "";
                        Cardiology_Surgery_Time.AsString = obj.Cardiology_Surgery_Time;//决定介入手术室时间
                        if (obj.Cardiology_Catheter_Time == null) obj.Cardiology_Catheter_Time = "";
                        Cardiology_Catheter_Time.AsString = obj.Cardiology_Catheter_Time;//启动导管室时间
                        if (obj.Cardiology_SUnderstandAgree_Time == null) obj.Cardiology_SUnderstandAgree_Time = "";
                        Cardiology_SUnderstandAgree_Time.AsString = obj.Cardiology_SUnderstandAgree_Time;
                        if (obj.Cardiology_EUnderstandAgree_Time == null) obj.Cardiology_EUnderstandAgree_Time = "";
                        Cardiology_EUnderstandAgree_Time.AsString = obj.Cardiology_EUnderstandAgree_Time;
                        //右下角区域
                        Killip_LV.AsString = GetKillip_LV(obj.Killip_LV);
                        NYHA_LV.AsString = GetNYHA_LV(obj.NYHA_LV);
                        NYHA_Type.AsString = GetClass(6, obj.NYHA_Type, 5);
                        STEMI_Methods.AsString = GetClass(7, obj.STEMI_Methods, 10);
                        NSTE_ACS.AsString = GetClass(8, obj.NSTE_ACS, 10);
                        //第二页
                        Cardiology_Thrombolysis_Check.AsString = GetCardiologyThrombolysisCheck(obj.Thrombolysis_Check);
                        Cardiology_Thrombolysis_Court.AsString = GetCardiology_Thrombolysis_Court(obj.Cardiology_Thrombolysis_Court);
                        if (obj.Cardiology_Thrombolysis_STime == null) obj.Cardiology_Thrombolysis_STime = "";
                        Cardiology_Thrombolysis_STime.AsString = obj.Cardiology_Thrombolysis_STime;
                        if (obj.Cardiology_Thrombolysis_ETime == null) obj.Cardiology_Thrombolysis_ETime = "";
                        Cardiology_Thrombolysis_ETime.AsString = obj.Cardiology_Thrombolysis_ETime;
                        if (obj.Cardiology_Thrombolysis_ImagingTime == null) obj.Cardiology_Thrombolysis_ImagingTime = "";
                        Cardiology_Thrombolysis_ImagingTime.AsString = obj.Cardiology_Thrombolysis_ImagingTime;
                        Cardiology_Thrombolysis_Drug.AsString = GetCardiology_Thrombolysis_Drug(obj.Cardiology_Thrombolysis_Drug);
                        Cardiology_Thrombolysis_DrugDose.AsString = GetCardiologyThrombolysisDrugDose(obj.Cardiology_Thrombolysis_DrugDose);
                        Cardiology_Thrombolysis_Again.AsString = GetCardiology_Thrombolysis_Again(obj.Cardiology_Thrombolysis_Again);
                        if (obj.Visit_ECG_Time == null) obj.Visit_ECG_Time = "";
                        Visit_ECG_Time.AsString = obj.Visit_ECG_Time;
                        if (obj.Visit_Troponin_Result == null) obj.Visit_Troponin_Result = "";
                        Visit_Troponin_Result.AsString = obj.Visit_Troponin_Result;
                        if (obj.Visit_Troponin_STime == null) obj.Visit_Troponin_STime = "";
                        Visit_Troponin_STime.AsString = obj.Visit_Troponin_STime;
                        if (obj.Visit_Troponin_RTime == null) obj.Visit_Troponin_RTime = "";
                        Visit_Troponin_RTime.AsString = obj.Visit_Troponin_RTime;
                        if (obj.Grace_Risk_LV == null) obj.Grace_Risk_LV = "";
                        Grace_Risk_LV.AsString = GetClass(9, obj.Grace_Risk_LV, 4);
                        Grace_Risk_Type.AsString = GetClass(10, obj.Grace_Risk_Type, 5);
                        Visit_Diagnosis.AsString = GetClass(11, obj.Visit_Diagnosis, 8);
                        //急诊留观 右侧区域
                        if (obj.PCI_Time == null) obj.PCI_Time = "";
                        PCI_Time.AsString = obj.PCI_Time;
                        if (obj.Antiplatelet_Time == null) obj.Antiplatelet_Time = "";
                        Antiplatelet_Time.AsString = obj.Antiplatelet_Time;
                        if (obj.Antiplatelet_Aspirin == null) obj.Antiplatelet_Aspirin = "";
                        Antiplatelet_Aspirin.AsString = obj.Antiplatelet_Aspirin;
                        if (obj.Antiplatelet_Ticagrelor == null) obj.Antiplatelet_Ticagrelor = "";
                        Antiplatelet_Ticagrelor.AsString = obj.Antiplatelet_Ticagrelor;
                        if (obj.Antiplatelet_Clopidogrel == null) obj.Antiplatelet_Clopidogrel = "";
                        Antiplatelet_Clopidogrel.AsString = obj.Antiplatelet_Clopidogrel;
                        if (obj.Treatment_24H_Bool == null) obj.Treatment_24H_Bool = "";
                        Treatment_24H_Bool.AsString = GetBool(obj.Treatment_24H_Bool);
                        Treatment_Blockers_Bool.AsString = GetBool(obj.Treatment_Blockers_Bool);
                        if (obj.EMS_Name == null) obj.EMS_Name = "";
                        EMS_Name.AsString = obj.EMS_Name;
                        //导管室
                        Catheter_Start_Type.AsString = GetCatheter_Start_Type(obj.Catheter_Start_Type);
                        if (obj.Catheter_Activation_Time == null) obj.Catheter_Activation_Time = "";
                        Catheter_Activation_Time.AsString = obj.Catheter_Activation_Time;
                        Catheter_Vascular_Pathway.AsString = GetClass(12, obj.Catheter_Vascular_Pathway, 4);
                        if (obj.Catheter_Piercing_Time == null) obj.Catheter_Piercing_Time = "";
                        Catheter_Piercing_Time.AsString = obj.Catheter_Piercing_Time;
                        if (obj.Catheter_Imaging_Time == null) obj.Catheter_Imaging_Time = "";
                        Catheter_Imaging_Time.AsString = obj.Catheter_Imaging_Time;
                        if (obj.Catheter_Adopt_Time == null) obj.Catheter_Adopt_Time = "";
                        Catheter_Adopt_Time.AsString = obj.Catheter_Adopt_Time;
                        if (obj.Catheter_SurgeryEnd_Time == null) obj.Catheter_SurgeryEnd_Time = "";
                        Catheter_SurgeryEnd_Time.AsString = obj.Catheter_SurgeryEnd_Time;
                        Catheter_CulpritVessel_Type.AsString = GetClass(13, obj.Catheter_CulpritVessel_Type, 5);
                        if (obj.Catheter_NoCulpritVessel_Type == null) obj.Catheter_NoCulpritVessel_Type = "";
                        Catheter_NoCulpritVessel_Type.AsString = GetBool(Catheter_NoCulpritVessel_Type);
                        if (obj.Catheter_CulpritVessel_STIMI == null) obj.Catheter_CulpritVessel_STIMI = "";
                        Catheter_CulpritVessel_STIMI.AsString = obj.Catheter_CulpritVessel_STIMI;
                        if (obj.Catheter_CulpritVessel_ETIMI == null) obj.Catheter_CulpritVessel_ETIMI = "";
                        Catheter_CulpritVessel_ETIMI.AsString = obj.Catheter_CulpritVessel_ETIMI;
                        if (obj.Catheter_CulpritVessel_Location == null) obj.Catheter_CulpritVessel_Location = "";
                        Catheter_CulpritVessel_Location.AsString = GetClass(50, obj.Catheter_CulpritVessel_Location, 27,1);
                        if (obj.Catheter_NoCulpritVessel_Location == null) obj.Catheter_NoCulpritVessel_Location = "";
                        Catheter_NoCulpritVessel_Location.AsString = GetClass(51, obj.Catheter_NoCulpritVessel_Location, 27,1);

                        Catheter_BloodClots_Bool.AsString = GetBool(obj.Catheter_BloodClots_Bool);
                        Catheter_Lesions_Bool.AsString = GetBool(obj.Catheter_Lesions_Bool);
                        Catheter_CTO_Bool.AsString = GetClass(14, obj.Catheter_CTO_Bool, 1);
                        if (obj.Catheter_Stents_Num == null) obj.Catheter_Stents_Num = "";
                        Catheter_Stents_Num.AsString = obj.Catheter_Stents_Num;
                        Catheter_Anticoagulation_Type.AsString = GetClass(15, obj.Catheter_Anticoagulation_Type, 3);
                        if (obj.Catheter_Anticoagulation_Num == null) obj.Catheter_Anticoagulation_Num = "";
                        Catheter_Anticoagulation_Num.AsString = obj.Catheter_Anticoagulation_Num;
                        if (obj.Catheter_Anticoagulation_Time == null) obj.Catheter_Anticoagulation_Time = "";
                        Catheter_Anticoagulation_Time.AsString = obj.Catheter_Anticoagulation_Time;
                        if (obj.Catheter_Imaging_Lumen == null) obj.Catheter_Imaging_Lumen = "";
                        Catheter_Imaging_Lumen.AsString = GetClass(16, obj.Catheter_Imaging_Lumen, 4);
                        Catheter_Detection_Type.AsString = GetClass(17, obj.Catheter_Detection_Type, 3);
                        Catheter_IABP_Bool.AsString = GetBool(obj.Catheter_IABP_Bool);
                        Catheter_BloodClots_Suction.AsString = GetBool(obj.Catheter_BloodClots_Suction);
                        Catheter_Pacemaker.AsString = GetBool(obj.Catheter_Pacemaker);
                        Catheter_ECMO.AsString = GetBool(obj.Catheter_ECMO);
                        Catheter_LeftAssistDevice.AsString = GetBool(obj.Catheter_LeftAssistDevice);
                        Catheter_Complications = GetClass(18, obj.Catheter_Complications, 9);
                        if (obj.Catheter_B2B == null) obj.Catheter_B2B = "";
                        Catheter_B2B.AsString = obj.Catheter_B2B;
                        Catheter_Delay_Bool.AsString = GetBool(obj.Catheter_Delay_Bool);
                        if (obj.Catheter_Name == null) obj.Catheter_Name = "";
                        Catheter_Name.AsString = obj.Catheter_Name;

                        //转归
                        OutComeType.AsString = GetOutComeType(obj.OutComeType);
                        OutCome_DIAGNOSIS = GetClass(19, obj.OutCome_DIAGNOSIS, 7);
                        if (obj.OutCome_Time == null) obj.OutCome_Time = "";
                        OutCome_Time.AsString = obj.OutCome_Time;
                        if (obj.OutCome_72H_MAX == null) obj.OutCome_72H_MAX = "";
                        OutCome_72H_MAX.AsString = obj.OutCome_72H_MAX;
                        OutCome_BNP_Type.AsString = GetClass(20, obj.OutCome_BNP_Type, 2);
                        if (obj.OutCome_BNP_Values == null) obj.OutCome_BNP_Values = "";
                        OutCome_BNP_Values.AsString = obj.OutCome_BNP_Values;
                        if (obj.OutCome_Imaging == null) obj.OutCome_Imaging = "";
                        OutCome_Imaging.AsString = obj.OutCome_Imaging;
                        OutCome_Complications.AsString = GetClass(21, obj.OutCome_Complications, 13);
                        OutCome_Risk.AsString = GetClass(22, obj.OutCome_Risk, 6);
                        OutCome_HeartFailure.AsString = GetBool(obj.OutCome_HeartFailure);
                        if (obj.LeaveHospitalTime == null) obj.LeaveHospitalTime = "";
                        LeaveHospitalTime.AsString = obj.LeaveHospitalTime;
                        if (obj.InHospital_Day == null) obj.InHospital_Day = "";
                        InHospital_Day.AsString = obj.InHospital_Day;
                        if (obj.OutCome_Cost == null) obj.OutCome_Cost = "";
                        OutCome_Cost.AsString = obj.OutCome_Cost;
                        Treatment_Results.AsString = GetTreatment_Results(obj.Treatment_Results, 4);
                        TakeMedicineType.AsString = GetClass(23, obj.TakeMedicineType, 4);
                        if (obj.Treatment_Name == null) obj.Treatment_Name = "";
                        Treatment_Name.AsString = obj.Treatment_Name;

                        Recordset.Post();
                        ReportViewer.Start();
                    }
                }
            });
        }

        function GetOutComeType(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "0": return "1#0#0#0";
                case "1": return "0#1#0#0";
                case "2": return "0#0#1#0";
                case "3": return "0#0#0#1";
                default: return "0#0#0#0";
            }
        }

        function GetTreatment_Results(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "0": return "1#0#0#0";
                case "1": return "0#1#0#0";
                case "2": return "0#0#1#0";
                case "3": return "0#0#0#1";
                default: return "0#0#0#0";
            }
        }

        function GetCatheter_Start_Type(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "0": return "1#0#0";
                case "1": return "0#1#0";
                case "2": return "0#0#1";
                default: return "0#0#0";
            }
        }
        //只能传 1 或者 0
        //1返回1#0 0返回0#1 其他返回0#0
        function GetBool(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "1": return "1#0";
                case "0": return "0#1";
                default: return "0#0";
            }
        }
        function GetCardiology_Thrombolysis_Again(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "1": return "1#0";
                case "0": return "0#1";
                default: return "0#0";
            }
        }

        function GetCardiologyThrombolysisDrugDose(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "0": return "0#1";
                case "1": return "1#0";
                default: return "0#0";
            }
        }

        function GetCardiology_Thrombolysis_Drug(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "0": return "1#0#0";
                case "1": return "0#1#0";
                case "2": return "0#0#1";
                default: return "0#0#0";
            }
        }

        function GetCardiology_Thrombolysis_Court(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "1": return "1#0";
                case "0": return "0#1";
                default: return "0#0";
            }
        }

        function GetCardiologyThrombolysisCheck(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "0": return "1#0#0";
                case "1": return "0#1#0";
                case "2": return "0#0#1";
                default: return "0#0#0";
            }
        }

        function GetNYHA_LV(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "0": return "1#0#0#0";
                case "1": return "0#1#0#0";
                case "2": return "0#0#1#0";
                case "3": return "0#0#0#1";
                default: return "0#0#0#0";
            }
        }

        function GetKillip_LV(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "0": return "1#0#0#0";
                case "1": return "0#1#0#0";
                case "2": return "0#0#1#0";
                case "3": return "0#0#0#1";
                default: return "0#0#0#0";
            }
        }


        function GetTriage_To(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "0": return "1#0#0";
                case "1": return "0#1#0";
                case "2": return "0#0#1";
                default: return "0#0#0";
            }
        }

        //返回指定len长度的1#0#1#0 类似值
        //cls参数为不定长度的0,1,2,3 or 0,1,3, 复选框勾选项值 从零开始
        //typename 随意输入 用于调试标识谁调用了该方法
        //step 偏移值 如果从1开始则为1
        function GetClass(typename, cls, len, step) {
            if (IsEmpty(step))
                step = 0;
            //alert(typename + "|" + cls + "|" + len);
            var res = [];
            for (var i = 0; i < len; i++) {
                res.push('0#');
            }
            var arr = [];
            if (!IsEmpty(cls) && cls != null) {
                if (cls.length == 1)
                    cls = cls += ",";
                arr = cls.toString().split(',');
            }
            for (i = 0; i < arr.length; i++) {
                res[arr[i] - step] = '1#';
            }

            var result = "";
            for (i = 0; i < len; i++)
                result += res[i];

            if (result.length > 0)
                result = result.substring(0, result.length - 1)
            return result;
        }

        //0,1,2,3 依次表示 清醒 语言有反应 刺痛反应 刺激无反应
        //该函数被GetClass取代
        function GetPatientConsciousness(pcval) {
            if (!IsEmpty(pcval)) pcval = pcval.toString();
            if (pcval == null || pcval == "") return "0#0#0#0"
            var res = "";
            pcval = pcval += ",";
            if (pcval.toString().indexOf("0,") >= 0) {
                res += "1#"
            }
            else {
                res += "0#"
            }
            if (pcval.toString().indexOf("1,") >= 0) {
                res += "1#"
            }
            else {
                res += "0#"
            }
            if (pcval.toString().indexOf("2,") >= 0) {
                res += "1#"
            }
            else {
                res += "0#"
            }
            if (pcval.toString().indexOf("3,") >= 0) {
                res += "1#"
            }
            else {
                res += "0#"
            }
            res = res.substring(0, res.length - 1);
            return res;
        }


        function GetPATIENT_ARRIVE_CLASS(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "1": return "1#0#0#0";
                case "2": return "0#1#0#0";
                case "3": return "0#0#1#0";
                case "4": return "0#0#0#1";
                default: return "0#0#0#0";
            }
        }

        function GetPreHospital_CPC(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "0": return "1#0";
                case "1": return "0#1";
                default: return "0#0";
            }
        }

        function GetPreHospital_Diagnosis(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "0": return "1#0#0#0#0#0";
                case "1": return "0#1#0#0#0#0";
                case "2": return "0#0#1#0#0#0";
                case "3": return "0#0#0#1#0#0";
                case "4": return "0#0#0#0#1#0";
                case "5": return "0#0#0#0#0#1";
                default: return "0#0#0#0#0#0";
            }
        }

        function GetThrombolysis_Recanalization_Bool(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "1": return "1#0";
                case "0": return "0#1";
                default: return "0#0";
            }
        }

        function GetThrombolysis_Drug_Dose(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "0": return "1#0";
                case "1": return "0#1";
                default: return "0#0";
            }
        }

        function GetThrombolysis_Drug_Type(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "0": return "1#0#0";
                case "1": return "0#1#0";
                case "2": return "0#0#1";
                default: return "0#0#0";
            }
        }

        function GetThrombolysis_Place(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "0": return "1#0";
                case "1": return "0#1";
                default: return "0#0";
            }
        }

        function GetThrombolysis_Surgery(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "1": return "1#0";
                case "0": return "0#1";
                default: return "0#0";
            }
        }

        function GetThrombolysis_Check(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "0": return "1#0#0";
                case "1": return "0#1#0";
                case "2": return "0#0#1";
                default: return "0#0#0";
            }
        }

        function GetAspirinClopidogrel_Bool(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "0": return "0#1";
                case "1": return "1#0";
                default: return "0#0";
            }
        }

        //<option value="1">实时监控 0#0#1</option>
        //<option value="2">微信群 1#0#0</option>
        //<option value="9">短信 0#1#0</option>
        function GetTransmissionClass(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "1": return "0#0#1";
                case "2": return "1#0#0";
                case "9": return "0#1#0";
                default: return "0#0#0";

            }
        }

        function GetIsEcgTransmission(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "0": return "0#1";
                case "1": return "1#0";
                default: return "0#0";
            }
        }
        //0=>男  1=>女
        function GetGender(val) {
            if (!IsEmpty(val)) val = val.toString();
            if (val == "男") return "1#0";
            if (val == "女") return "0#1";
            if (val == "0") return "1#0";
            if (val == "1") return "0#1";
            return "0#0";
        }
        function GetPayType(val) {
            if (!IsEmpty(val)) val = val.toString();
            switch (val) {
                case "1": return "1#0#0#0";
                case "2": return "0#1#0#0";
                case "3": return "0#0#1#0";
                case "4": return "0#0#0#1";
                default: return "0#0#0#0";
            }
        }
        function GetConsciousness(ids) {
            if (typeof (ids) == "undefined" || ids == null || ids.length <= 0) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0:
                        res += "清醒/";
                        break;
                    case 1:
                        res += "对语言有反应/";
                        break;
                    case 2:
                        res += "对刺痛有反应/";
                        break;
                    case 3:
                        res += "对任何刺激无反应/";
                        break;
                    default:
                        break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetArriveClassName(id) {
            if (typeof (id) == "undefined" || id == null || id.length <= 0) return "";
            switch (parseInt(id)) {
                case 0:
                    return "未知";
                case 1:
                    return "120";
                case 2:
                    return "转院";
                case 3:
                    return "自行来院";
                case 4:
                    return "院内发病";
                default:
                    return "未知";
            }
        }
    </script>
</body>
</html>